fn main() {
    let s = String::from("hello world");
    func(&s);
}

fn func(str: &String){ // str是s的引用
    println!("{str}");
}